<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class FlowDo extends Model
{
    protected $fillable = ['name','ranks','type','sId','sName','doId','doName','sDate','eDate','goodsId','goodsType','goodsName','count','unit','price','cost','realCost','storageId','storage','flowId','flowName','resultId','result','info','start'];
    public function children()
    {
        return $this->hasMany('App\FlowDoChildren', 'flowDoId');
    }
    public function goodsFitst()
    {
        return $this->hasMany('App\FlowFirst', 'flowDoId');
    }
    public function goodsEnd()
    {
        return $this->hasMany('App\FlowEnd', 'flowDoId');
    }
}
